package com.xujie.property_warranty_system.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 设备维护记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("facility_maintenance")
public class FacilityMaintenance {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 设备ID
     */
    @TableField("facility_id")
    private Long facilityId;
    
    /**
     * 维护类型：1-定期维护，2-故障维修
     */
    @TableField("maintenance_type")
    private Integer maintenanceType;
    
    /**
     * 维护日期
     */
    @TableField("maintenance_date")
    private LocalDateTime maintenanceDate;
    
    /**
     * 维护人员
     */
    @TableField("maintenance_person")
    private String maintenancePerson;
    
    /**
     * 维护结果：1-正常，2-需要跟进，3-建议报废
     */
    @TableField("maintenance_result")
    private Integer maintenanceResult;
    
    /**
     * 维护费用
     */
    @TableField("cost")
    private BigDecimal cost;
    
    /**
     * 维护描述
     */
    @TableField("description")
    private String description;
    
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
